package com.auction.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 拍卖品实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Auction implements Serializable {
    
    private Long id; // 拍卖品ID

    private Long sellerId; // 卖家ID
    
    private Long categoryId; // 类目ID
    
    private String title; // 拍卖品标题
    
    private String description; // 详细描述
    
    private String image; // 图片

    private BigDecimal startPrice; // 起拍价

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime; // 开始时间

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime; // 结束时间
    
    private String status; // 状态：PENDING-待处理，ACTIVE-激活，FINISHED-已结束，CANCELLED-已取消

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime; // 创建时间

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime; // 更新时间
}